Part Number Hot Search : 
25T10 D6432 N5401 TDA8020 PESD3V3 E101M SFJ78G29 EMK11
Product Description
Full Text Search
 

To Download STK500 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  STK500 .............................................................................................. user guide

avr STK500 user guide i 1925c?avr?3/03 table of contents section 1 introduction ........................................................................................... 1-1 1.1 starter kit features ...................................................................................1-1 1.2 device support .........................................................................................1-2 section 2 getting started...................................................................................... 2-1 2.1 unpacking the system ..............................................................................2-1 2.2 system requirements...............................................................................2-1 2.3 quick start ................................................................................................2-2 2.3.1 connecting the hardware...................................................................2-3 2.3.2 programming the target avr device ................................................2-3 section 3 hardware description ........................................................................... 3-1 3.1 description of user leds..........................................................................3-1 3.2 description of user switches ....................................................................3-2 3.3 connection of leds and switches............................................................3-3 3.4 port connectors ........................................................................................3-3 3.5 description of user rs-232 interface .......................................................3-5 3.6 description of dataflash pins...................................................................3-6 3.7 target socket section...............................................................................3-8 3.7.1 isp programming ...............................................................................3-9 3.7.2 high-voltage programming...............................................................3-11 3.8 jumper settings ......................................................................................3-15 3.8.1 target v cc settings, vtarget .......................................................3-16 3.8.2 analog reference voltage, aref ....................................................3-17 3.8.3 reset settings, reset ....................................................................3-18 3.8.4 clock settings, xtal1 and oscsel ...............................................3-20 3.8.5 bsel2 jumper .................................................................................3-22 3.8.6 pjump jumpers...............................................................................3-22 3.9 expansion connectors ............................................................................3-23 3.9.1 signal descriptions...........................................................................3-25 3.10 prog ctrl and prog data headers ...........................................................3-25 3.11 miscellaneous .........................................................................................3-26 3.11.1 reset push button .........................................................................3-26 3.11.2 program push button ..................................................................3-27
table of contents ii avr STK500 user guide 1925c?avr?3/03 3.11.3 main power led...............................................................................3-27 3.11.4 target power led ............................................................................3-27 3.11.5 status led .......................................................................................3-27 section 4 installing avr studio ............................................................................ 4-1 section 5 using avr studio ................................................................................. 5-1 5.1 windows software ....................................................................................5-1 5.2 starting the windows software .................................................................5-1 5.2.1 starting STK500 .................................................................................5-1 5.3 STK500 user interface .............................................................................5-2 5.3.1 ?program? settings .............................................................................5-2 5.3.2 ?fuses? settings .................................................................................5-3 5.3.3 ?lockbits? settings..............................................................................5-4 5.3.4 ?advanced? settings ...........................................................................5-4 5.3.5 ?board? settings..................................................................................5-5 5.3.6 ?auto? settings....................................................................................5-7 5.3.7 history window...................................................................................5-8 5.4 command line software ..........................................................................5-9 5.5 parameters ...............................................................................................5-9 section 6 in-system programming of an exte rnal target system ....................... 6-1 section 7 troubleshooting guide ......................................................................... 7-1 section 8 technical support................................................................................. 8-1 section 9 example applications ........................................................................... 9-1 9.1 using leds and switches.........................................................................9-1 section 10 appendix a ......................................................................................... 10-1
avr STK500 user guide 1-1 rev. 1925c?avr?3/03 section 1 introduction congratulations on your purchase of the avr ? STK500 flash microcontroller starter kit. the STK500 is a complete starter kit and development system for the avr flash microcontroller from atmel corporation. it is designed to give designers a quick start to develop code on the avr and for prototyping and testing of new designs. 1.1 starter kit features  avr studio ? compatible  rs-232 interface to pc for programming and control  regulated power supply for 10 - 15v dc power  sockets for 8-pin, 20-pin, 28-pin, and 40-pin avr devices  parallel and serial high-voltage programming of avr devices  serial in-system programming (isp) of avr devices  in-system programmer for programming avr devices in external target system  reprogramming of avr devices  8 push buttons for general use  8 leds for general use  all avr i/o ports easily accessible through pin header connectors  additional rs-232 port for general use  expansion connectors for plug-in modules and prototyping area  (nb! no longer valid: " on-board 2-mbit dataflash ? for nonvolatile data storage ") the STK500 is supported by avr studio, version 3.2 or higher. for up-to-date informa- tion on this and other avr tool products, please read the document ?avrtools.pdf?. the newest version of avr studio, ?avrtools.pdf? and this user guide can be found in the avr section of the atmel web site, www.atmel.com .
introduction 1-2 avr STK500 user guide 1925c?avr?3/03 figure 1-1. STK500 1.2 device support the system software currently supports the following devices in all speed grades: note: 1. in external target or in stk501, devices do not fit into the sockets of STK500. support for new avr devices may be added in new versions of avr studio. the latest version of avr studio is always available from www.atmel.com .  at t i n y 1 1  at90s4433  at t i n y 1 2  at90s4434  at t i n y 1 5  at90s8515  at t i n y 2 2  at90s8535  at t i n y 2 8  atmega8  at90s1200  atmega16  at90s2313  atmega161  at90s2323  atmega163  at90s2333  atmega323  at90s2343  atmega103 (1)  at90s4414  atmega128 (1)
avr STK500 user guide 2-1 rev. 1925c?avr?3/03 section 2 getting started 2.1 unpacking the system kit contents:  STK500 starter kit evaluation board  cables for STK500: ? (2 pcs) 10-wire cables for i/o ports and parallel mode programming ? (1 pc) 6-wire cable for in-system programming ? (4 pcs) 2-wire cable for uart and dataflash connections  9-pin rs-232 cable  dc power cable  atmel cd-rom with datasheets and software  at90s8515-8pc sample microcontroller 2.2 system requirements the minimum hardware and software requirements are:  486 processor (pentium ? is recommended)  16 mb ram  12 mb free hard disk space (avr studio)  windows ? 95/98/2000/me and windows nt ? 4.0 or higher  115200 baud rs-232 port (com port)  10 - 15v dc power supply, 500 ma min.
getting started 2-2 avr STK500 user guide 1925c?avr?3/03 2.3 quick start the STK500 starter kit is shipped with an at90s8515-8pc microcontroller in the socket marked sckt3000d3. the default jumper settings will allow the microcontroller to exe- cute from the clock source and voltage regulator on the STK500 board. the microcontroller is programmed with a test program that toggles the leds. the test program in the at90s8515 is similar to the example application code described in sec- tion 9. connect the leds and switches and power up the STK500 to run the test program in the at90s8515. use the supplied 10-pin cables to connect the header marked ?portb? with the header marked ?leds?, and connect the header marked ?portd? with the header marked ?switches?. the connections are shown in figure 2-1. an external 10 - 15v dc power supply is required. the input circuit is a full bridge recti- fier, and the STK500 automatically handles both positive or negative center connectors. if a positive center connector is used, it can be impossible to turn the STK500 off since the power switch disconnects the gnd terminal. in this case, gnd can be supplied through the rs-232 cable shield if connected or through alternative gnd connections. connect the power cable between a power supply and the STK500. apply 10 - 15v dc to the power connector. the power switch turns the STK500 main power on and off. the red led is lit when power is on, and the st atus leds will go from red, via yellow, to green. the green led indicates that the target v cc is present. the program now run- ning in the at90s8515 will respond to pressed switches by toggling the leds. figure 2-1. default setup of STK500 the starter kit can be configured for various clock and power sources. a complete description of the jumper settings is explained in paragraph 3.8 on page 3-15 and on the reverse side of the starter kit.
getting started avr STK500 user guide 2-3 1925c?avr?3/03 2.3.1 connecting the hardware figure 2-2. connection to STK500 to program the at90s8515, connect the supplied 6-wire cable between the isp6pin header and the sprog3 target isp header as shown in figure 2-1. section 3.7.1 on page 3-9 describes the programming cable connections. connect a serial cable to the connector marked ?rs232 ctrl? on the evaluation board to a com port on the pc as shown in figure 2-2. install avr studio software on the pc. instructions on how to install and use avr studio are given in section 5 on page 5-1. when avr studio is started, the program will automatically detect to which com port the STK500 is connected. 2.3.2 programming the target avr device the STK500 is controlled from avr studio, version 3.2 and higher. avr studio is an integrated development environment (ide) for developing and debugging avr applica- tions. avr studio provides a project management tool, source file editor, simulator, in- circuit emulator interface and programming interface for STK500. to program a hex file into the target avr device, select ?STK500? from the ?tools? menu in avr studio. select the avr target device from the pull-down menu on the ?program? tab and locate the intel-hex file to download. press the ?erase? button, followed by the ?program? button. the status led will now turn yellow while the part is programmed, and when programming succeeds, the led will turn green. if programming fails, the led will turn red after programming. see the troubleshooting guide in section 7 on page 7-1. to computer (rs-232) 10 - 15v dc
getting started 2-4 avr STK500 user guide 1925c?avr?3/03 figure 2-3. avr studio STK500 programming menu complete descriptions of using the STK500 interface in avr studio are given in section 5 on page 5-1.
avr STK500 user guide 3-1 rev. 1925c?avr?3/03 section 3 hardware description figure 3-1. STK500 components 3.1 description of user leds the STK500 starter kit includes 8 yellow leds and 8 push-button switches. the leds and switches are connected to debug headers that are separated from the rest of the board. they can be connected to the avr devices with the supplied 10-wire cable to the pin header of the avr i/o ports. figure 3-4 shows how the leds and switches can be connected to the i/o port headers. the cables should be connected directly from the port header to the led or switch header. the cable should not be twisted. a red wire on the cable indicates pin 1. confirm that this is connected to pin 1 on each of the headers. figure 3-2 shows how the led control is implemented. this solution will give the same amount of light from the led for all target voltages from 1.8v to 6.0v. power switch power connector power led parallel programming headers rs-232 port for programming master mcu status led rs-232 port for communication options setting jumpers sockets for target avr headers for i/o ports switches header for switches rs-232 interface header dataflash interface header leds header for expansion boards header for leds 10-pin isp header (for external target only) 6-pin isp header target isp headers program button socket for crystal target reset push button header for expansion boards
hardware description 3-2 avr STK500 user guide 1925c?avr?3/03 figure 3-2. implementation of leds and led headers note: the avr can source or sink enough current to drive a led directly. in the STK500 design, a transistor with two resistors is used to give the same amount of light from the led, whatever the target voltage (vtg) may be and to turn off the leds when vtg is missing. 3.2 description of user switches the switches connected to the debug headers are implemented as shown in figure 3-3. pushing a switch causes the corresponding swx to be pulled low, while releasing it will result in vtg on the appropriate switch header connector. valid target voltage range is 1.8v < vtg < 6.0v. figure 3-3. implementation of switches and switch headers note: in the avr, the user can enable internal pull-ups on the input pins, removing the need for an external pull-up on the push-button. in the STK500 design, we have added an external 10k pull-up to give all users a logical ?1? on swn when the push-button is not pressed. the 150r resistor limits the current going into the avr. led1 led3 led5 led7 vtg led0 led2 led4 led6 gnd 1 2 ledn 10k vtg +5v 150r 10k 150r vtg sw n sw n sw1 sw3 sw5 sw7 vtg sw0 sw2 sw4 sw6 gnd 1 2
hardware description avr STK500 user guide 3-3 1925c?avr?3/03 3.3 connection of leds and switches figure 3-4. connection of leds and switches to i/o port headers any i/o port of the avr can be connected to the leds and switches using the 10-wire cables. the headers are supplied with vtg (target v cc ) and gnd lines in addition to the signal lines. 3.4 port connectors the pinout for the i/o port headers is explained in figure 3-5. the square marking indi- cates pin 1. figure 3-5. general pinout of i/o port headers the porte/aux header has some special signals and functions in addition to the porte pins. the pinout of this header is shown in figure 3-6. px1 px3 px5 px7 vtg px0 px2 px4 px6 gnd 1 2 portx
hardware description 3-4 avr STK500 user guide 1925c?avr?3/03 figure 3-6. pinout of porte header the special functions of this port are:  pe0 - pe2:  ref: analog reference voltage. this pin is connected to the aref pin on devices having a separate analog reference pin.  xt1: xtal 1 pin. the internal main clock signal to all sockets. if the xtal1 jumper is disconnected, this pin can be used as external clock signal.  xt2: xtal 2 pin. if the xtal1 jumper is disconnected, this pin can be used for external crystal with the xt1 pin. the headers for the leds and switches use the same pinout as the i/o port headers. the pinout of the switch header is explained in figure 3-7 and the pinout for the led header is explained in figure 3-8. the square marking indicates pin 1. figure 3-7. pinout of the switch header figure 3-8. pinout of the led header table 3-1. porte connection atmega161 at90s4414/at90s8515 pe0 pe0/icp/int2 icp pe1 pe1/ale ale pe2 pe2/oc1b oc1b pe1 rst gnd xt2 vtg pe0 pe2 ref xt1 gnd 1 2 porte/aux sw1 sw3 sw5 sw7 vtg sw0 sw2 sw4 sw6 gnd 1 2 switches led1 led3 led5 led7 vtg led0 led2 led4 led6 gnd 1 2 leds
hardware description avr STK500 user guide 3-5 1925c?avr?3/03 3.5 description of user rs-232 interface the STK500 includes two rs-232 ports. one rs-232 port is used for communicating with avr studio. the other rs-232 can be used for communicating between the target avr microcontroller in the socket and a pc serial port connected to the rs-232. to use the rs-232, the uart pins of the avr need to be physically connected to the rs-232. the 2-pin header marked ?rs232 spare? can be used for connecting the rs-232 con- verter to the uart pins on the target avr microcontroller in the socket. use the 2-wire cable to connect the uart pins to the rs-232. the connection is shown in figure 3-9. the block schematic of the rs-232 connection is shown in figure 3-10. figure 3-9. connection of i/o pins to uart figure 3-10. schematic of uart pin connections txd rxd voltage converter vtg 5v max202cse 470r 470r 1n2 1n2 2 3 5v rs-232
hardware description 3-6 avr STK500 user guide 1925c?avr?3/03 3.6 description of dataflash pins nb! not valid: at45d021 2-mbit dataflash is included on the STK500 for data storage. a dataflash is a high-density flash memory with spi serial interface. a detailed datasheet of the dataflash can be obtained from the flash memory section of the atmel cd-rom or from the atmel web site. the dataflash can be connected to the i/o pins of the microcontroller sockets. the 4-pin header marked ?dataflash? can be used for connecting the spi interface of the dataflash to the i/o pins on the target avr microcontroller in the socket. 2-wire cables are included with STK500 for connecting the dataflash to the i/o pins. the supplied 10-wire cables can also be used if the dataflash is connected to the hardware spi inter- face on portb of the avr microcontroller. the connection of the i/o pins is shown in figure 3-13. the block schematic of the dataflash connection is shown in figure 3-14, for connection of the dataflash to the avr hardware spi interface. the spi interface pinout is shown in figure 3-11 and figure 3-12. figure 3-11. portb spi pinout (40-pin parts) figure 3-12. portb spi pinout (28-pin analog parts) pb1 pb3 pb5(mosi) pb7(sck) vtg pb0 pb2 (ss)pb4 (miso)pb6 gnd 1 2 pb1 pb3(mosi) pb5(sck) pb7 vtg pb0 (ss)pb2 (miso)pb4 pb6 gnd 1 2
hardware description avr STK500 user guide 3-7 1925c?avr?3/03 figure 3-13. connection of i/o pins to dataflash for at90s8515 figure 3-14. schematic of dataflash connections voltage converter vtg 5v at45d021 dataflash cs si s0 sck s0 si sck cs 5v
hardware description 3-8 avr STK500 user guide 1925c?avr?3/03 3.7 target socket section the programming module consists of the eight sockets in the white area in the middle of the starter kit. in these sockets, the target avr devices can be inserted for programming and are used in the application. note: only one avr device should be inserted in the sockets at a time. the avr flash memory is guaranteed to be correct after 1,000 programming opera- tions; the typical lifetime of the flash memory is much longer. note: when inserting a device in the socket, notice the orientation of the device. the notch on the short side of the part must match the notch on the socket. if the device is inserted the wrong way, it may damage the part and the starter kit. the socket section is used for both running applications and target device programming. figure 3-15. the STK500 programming module the part inserted in the socket can be programmed in the system from avr studio with two different methods: 1. avr in-system programming (isp) running at the parts normal supply voltage. 2. high-voltage programming, where the supply voltage is always 5 volts. four general nets (vtarget, reset, xtal1 and aref) can be connected to the socket section. the following sections describe how to use both programming methods. for instructions on using the avr studio programming software, see section 5, ?using avr studio? on page 5-1.
hardware description avr STK500 user guide 3-9 1925c?avr?3/03 3.7.1 isp programming in-system programming uses the avr internal spi (serial peripheral interface) to download code into the flash and eeprom memory of the avr. isp programming requires only v cc , gnd, reset and three signal lines for programming. all avr devices except at90c8534, attiny11 and attiny28 can be isp programmed. the avr can be programmed at the normal operating voltage, normally 2.7 - 6.0v. no high-volt- age signals are required. the isp programmer can program both the internal flash and eeprom. it also programs fuse bits for selecting clock options, start-up time and inter- nal brown-out detector (bod) for most devices. high-voltage programming can also program devices that are not supported by isp pro- gramming. some devices require high-voltage programming for programming certain fuse bits. see the high-voltage programming section on page 3-11 for instructions on how to use high-voltage programming. because the programming interface is placed on different pins from part to part, three programming headers are used to route the programming signals to the correct pins. a 6-wire cable is supplied for connecting the isp signals to the target isp header. a color coding system and a number system are used to explain which target isp header is used for each socket. during isp programming, the 6-wire cable must always be connected to the header marked ?isp6pin?. when programming parts in the blue sockets, connect the other end of the cable to the blue sprog1 target isp header. when programming parts in the green socket, use the green sprog2 target isp header. and when programming parts in the red sockets, use the red sprog3 target isp header.table 3-2 shows which socket suits which avr device, and which sprog target isp header to use for isp programming. the 6-wire cables should be connected directly from the isp6pin header to the correct sprog target isp header. the cable should not be twisted. a colored wire on the cable indicates pin 1. confirm that this is connected to pin 1 on each of the headers. when programming 8-pin devices, note the following: pin 1 is used both as reset and as pb5 on some devices (attiny11, attiny12 and attiny15). pin 1 on the 8-pin sockets sckt3400d1 and sckt3400d1 are connected to pb5. the reset signal used during isp programming is therefore not connected to pin 1 on these sockets. this signal must be connected by placing a wire between rst and the porte header and pb5 on the portb header.
hardware description 3-10 avr STK500 user guide 1925c?avr?3/03 figure 3-16 shows an example of how at90s2313 can be in-system programmed. the 6-wire cable is connected from the isp6pin header to the red sprog3 target isp header, and the at90s2313 part is inserted in the red socket marked ?sckt3100d3?. figure 3-16. example connection for programming at90s2313 table 3-2. avr sockets avr devices STK500 socket color number target isp header at90s1200 at90s2313 sckt3300d3 red 3 sprog3 at90s2323 at90s2343 at t i n y 1 2 at t i n y 2 2 sckt3400d1 blue 1 sprog1. connect rst on porte to pb5 on portb. connect xti on porte to pb3 (xtal1 on 2323) on portb. attiny11 sckt3400d1 blue 1 high-voltage programming only attiny28 sckt3500d- none ? high-voltage programming only at90s4414 at90s8515 atmega161 sckt3000d3 red 3 sprog3 at90s4434 at90s8535 atmega16 atmega163 atmega323 sckt3100a3 red 3 sprog3 at90s2333 at90s4433 at m e g a 8 sckt3200a2 green 2 sprog2 attiny15 sckt3600a1 blue 1 sprog1. connect rst on porte to pb5 on portb. n/a sckt3700a1 blue 1 socket is not in use in this version of STK500 atmega103 atmega128 use the stk501 top module avr sckt3300d3 sprog1 sprog2 sprog3 isp6pin
hardware description avr STK500 user guide 3-11 1925c?avr?3/03 it is not necessary to remove the 6-wire cable from its isp position while running a pro- gram in the avr. the port pins used for isp programming can be used for other purposes in your program. 3.7.2 high-voltage programming for high-voltage programming, a 12v programming voltage is applied to the reset pin of the avr device. all avr devices can be programmed with high-voltage program- ming, and the target device can be programmed while it is mounted in its socket. two different methods are used for high-voltage programming: 8-pin parts use a serial programming interface, while other parts use a parallel programming interface. the pro- gramming signals are routed to the correct pins of the target device using the cables supplied with STK500. table 3-3 summarizes the programming method and special considerations when using high-voltage programming. table 3-3. high-voltage programming settings avr devices STK500 socket color number high-voltage programming method at90s1200 at90s2313 sckt3300d3 red 3 parallel high-voltage programming. connect prog ctrl header to portd and prog data to portb, as shown in figure 3-17 on page 3-12. at90s4414 at90s8515 sckt3000d3 red 3 at90s4434 at90s8535 sckt3100a3 red 3 attiny28 sckt3500d- none ? atmega161 sckt3000d3 red 3 parallel programming as above; mount bsel2 jumper. see section 3.8. atmega16 atmega163 atmega323 sckt3100a3 red 3 at90s2333 at90s4433 sckt3200a2 green 2 parallel programming as above; mount pjump jumpers. see section 3.8. atmega103 atmega128 use the stk501 top module ? ? parallel programming as above; mount bsel2 jumper. see section 3.8. atmega8 sckt3200a2 green 2 parallel programming as above; mount pjump jumpers and mount bsel2 terminal to pc2. see section 3.8.5 and section 3.8.6. at90s2323 at90s2343 at t i n y 1 1 at t i n y 1 2 at t i n y 2 2 sckt3400d1 blue 1 serial high-voltage programming attiny15 sckt3600a1 blue 1 n/a sckt3700a1 blue 1 socket not in use in this version of STK500
hardware description 3-12 avr STK500 user guide 1925c?avr?3/03 3.7.2.1 parallel high-voltage programming to use high-voltage programming, the programming signal must be routed to the avr i/o pins. the two 10-wire cables supplied with the STK500 can be used to connect the prog data header to the portb header and the prog ctrl header to the portd header, as shown in figure 3-17. figure 3-17. connection for parallel high-voltage programming some of the jumper settings on STK500 must be changed when using high-voltage pro- gramming. figure 3-18 explains these jumper settings.
hardware description avr STK500 user guide 3-13 1925c?avr?3/03 figure 3-18. jumper settings for high-voltage programming hardware setup for parallel high-voltage programming: 1. switch power off. 2. place the device to program in its socket according to table 3-3 on page 3-11. 3. connect the headers progdata and portb with the 10-wire cable. 4. connect the headers progctrl and portd with the 10-wire cable. 5. mount jumper oscsel on pins 1 and 2 to select software-controlled clock. 6. mount jumper xtal1 to route the oscillator signal to the device. 7. mount jumpers vtarget and reset. 8. when programming at90s2333, at90s4433, or atmega8, mount both pjump jumpers. the 2-wire cables can be used instead of jumpers. 9. when programming atmega16, atmega163, atmega161, atmega128, or atmega323, mount the bsel2 jumper. when programming atmega8, connect bsel2 terminal to pc2. a 2-wire cable can be used instead of jumpers. 10. disconnect target system. 11. switch power on. 12. ensure that vtarget is between 4.5v and 5.5v before programming. see sec- tion 5.3.5.1. for a complete description of jumper settings, see section 3.8, ?jumper settings?. note: remove the hardware setup for high-voltage programming before starting a debug session. j umpers must be mounted device- dependent jumpers (see below) vtarget aref reset xtal1 oscsel bsel2 pjump
hardware description 3-14 avr STK500 user guide 1925c?avr?3/03 3.7.2.2 serial high-voltage programming the 8-pin avrs have too few pins to use parallel communication during high-voltage programming. they use serial communication instead. this means that fewer signals have to be routed. hardware setup for serial high-voltage programming is as follows: 1. switch power off. 2. place the device to program in its socket according to table 3-3 on page 3-11. 3. mount jumper oscsel on pins 1 and 2 to select software-controlled clock. 4. mount jumper xtal1 to route the oscillator signal to the device. 5. mount jumpers vtarget and reset. 6. use one 2-wire cable to connect the pb3 pin (pin 4) on the portb header to the xt1 pin (pin 7) on the porte/aux header. this will connect the clock system to the avr device. 7. use another 2-wire cable to connect the pb5 pin (pin 6) on the portb header to the rst pin (pin 4) on the porte/aux header. this will connect the reset sys- tem to the avr device. 8. use a third 2-wire cable to connect the pb0 and pb2 pins (pins 4 and 3) on the sprog1 header to the data0 and data2 pins (pins 1 and 3) on the prog data header. 9. use the last 2-wire cable to connect the pb1 pin (pin 1) on the sprog1 header to the data1 pin (pin 2) on the prog data header. 10. switch power on and you are ready to program. all connections are shown in figure 3-19. figure 3-19. connection for serial high-voltage programming
hardware description avr STK500 user guide 3-15 1925c?avr?3/03 3.8 jumper settings a master microcontroller and the eight jumpers control the hardware settings of the starter kit. during normal operation these jumpers should be mounted in the default position. to configure the starter kit for advanced use, the jumpers can be removed or set to new positions. the jumper settings and usage are explained in the following sec- tion. the default setting of the jumpers are shown in figure 3-20. figure 3-20. default jumper setting table 3-4. description of jumpers jumper description of default setting vtarget on-board vtarget supply connected aref on-board analog voltage reference connected reset on-board reset system connected xtal1 on-board clock system connected oscsel on-board oscillator selected bsel2 unmounted. used for high-voltage programming of atmega8, atmega16, atmega161, atmega163, atmega128, and atmega323 pjump unmounted. used for high-voltage programming of at90s2333, at90s4433, and atmega8 vtarget aref reset xtal1 oscsel bsel2 pjump
hardware description 3-16 avr STK500 user guide 1925c?avr?3/03 3.8.1 target v cc settings, vtarget vtarget controls the supply voltage to the target avr microcontroller sockets. it can either be controlled from avr studio or supplied from an external source. if the vtar- get jumper is mounted, the on-board supply voltage is connected. the on-board supply voltage can be adjusted to 0 - 6v from avr studio. always verify the respective datasheet for the avr device operating voltage before adjusting vtarget voltage. using the on-board supply voltage, approximately 0.5a can be delivered to the target section. see ?appendix a? in section 10. if the vtarget jumper is disconnected, target v cc must be supplied from an external source at one of the vtg pins on the port headers. figure 3-21 explains vtarget jumper options. when using an external source for vtarget, the user must control that vtarget is at a higher voltage level than aref (analog reference voltage). always connect com- mon ground (gnd) when using an external vtarget voltage. figure 3-21. vtarget jumper options the STK500 master microcontroller controls the target voltage using the internal pwm. figure 3-22 shows the internal connection of the vtarget signal. figure 3-22. vtarget connection note: the green led will light when there is a voltage available on the vtg net. it?s impossible to use the debug or programming area of STK500 without vtg. vtarget aref vtarget aref jumper mounted jumper not mounted on-board vtarget supply connected (default) on-board vtarget supply disconnected master mcu vtarget pwm vtg net green led jumper voltage regulator 10 - 15v vin 0 - 6v wr rd adc
hardware description avr STK500 user guide 3-17 1925c?avr?3/03 the internal vtarget has a short circuit protection. if vtarget is set to be higher than 0.3v and the master microcontroller measures it to be below 0.3v for a duration of 80 ms, the master microcontroller will shut off the vtarget and the internal aref. when this happens, the status led will blink quickly. if an external vtarget is used and the external vtarget is turned off, this will also be detected by the STK500 as a (false) short circuit. the latter case can be avoided by lowering the internal vtarget below 0.3v. 3.8.2 analog reference voltage, aref the analog reference voltage (aref) can supply the reference voltage to the on-chip a/d converter on the avr. if the aref jumper is mounted, the on-board analog refer- ence voltage is connected to the avr?s aref. the on-board analog reference voltage can be adjusted from avr studio to 0 - 6.0v, but not above vtarget. when the aref jumper is disconnected, aref voltage must be supplied from an exter- nal source at the aref pin on the porte/aux header (figure 3-6). figure 3-23 explains aref jumper options. when using an external source for aref, the user must control vtarget at a higher voltage level than aref. this can be co ntrolled easily by reading the vtg value from avr studio before setting aref. figure 3-23. aref jumper options the STK500 master microcontroller contro ls the analog reference voltage using the internal pwm. the avr?s aref signal is also accessible on the porte header; this pin can also be used for external aref signal. figure 3-24 shows the internal connec- tion of the aref signal. vtarget aref reset jumper mounted on-board aref voltage connected (default) vtarget aref reset jumper not mounted on-board aref voltage disconnected
hardware description 3-18 avr STK500 user guide 1925c?avr?3/03 figure 3-24. internal aref connection the avr studio-controlled analog reference voltage can also be used as an input to the analog comparator or for adc measurements on the avr. avr?s aref signal can then be connected to vtg. the internal aref has a short circuit protection. if an aref value is set up to be higher than 0.3v and the master microcontroller measures it to be below 0.3v for a duration of 80 ms, the master microcontroller will shut off the aref. when this happens, the status led will blink slowly. the aref will also be shut down by the master microcontroller if a short circuit is detected on vtarget (in addition to shutting down vtarget). in this case, the status led will blink quickly. 3.8.3 reset settings, reset the reset jumper controls the reset signal to the STK500. when isp programming the target device in the socket, the master microcontroller programs the avr device without interfering with the application. when the reset jumper is mounted, the master microcontroller controls the reset signal of the avr. when the reset jumper is not mounted, the reset signal is disconnected. this is useful for prototype applications with an external reset system. the reset jumper must always be mounted when high-voltage programming an avr device. when using an external reset system, it must allow the reset line to be controlled by the master microcontroller reset syst em during programming. the reset button is disconnected if the reset jumper is no t mounted. figure 3-25 explains the reset jumper options. pe1 rst gnd xt2 vtg pe0 pe2 ref xt1 gnd 1 2 master mcu aref pwm aref porte/aux jumper voltage regulator 10 - 15v vin 0 - 6v adc wr rd
hardware description avr STK500 user guide 3-19 1925c?avr?3/03 figure 3-25. reset jumper options the STK500 master mi crocontroller controls the reset signal to the target avr. the reset signal is accessible on the port e/aux header; this pin can also be used for external reset signal. figure 3-26 shows the internal connection of the reset signal. figure 3-26. internal reset connection note: during high-voltage programming, STK500 applies 12v to the avr?s reset line. thus, an external reset circuit not capable of handling this must be discon- nected before high-voltage programming the avr. aref reset xtal1 jumper mounted aref reset xtal1 jumper not mounted on-board reset signal disconnected on-board reset signal connected (default) pe1 rst gnd xt2 vtg pe0 pe2 ref xt1 gnd 1 2 master mcu reset net 0v - vtg - 12v reset circuit reset porte/aux reset jumper
hardware description 3-20 avr STK500 user guide 1925c?avr?3/03 when connected to an external system, ther e is often an external pull-up resistor con- nected to the reset line. a typical reset connection is shown in figure 3-27. figure 3-27. external reset connection if the external pull-up resistor is too low (<4.7 k ? ), STK500 will not be able to pull the reset line low. 3.8.4 clock settings, xtal1 and oscsel STK500 includes several clock options for the target avr. setting the jumpers xtal1 and oscsel controls the clock selections. oscsel determines what signal to route to the xtal1 pin of the avr. when the xtal1 jumper is connected, th e STK500 internal clock system is used as main clock to the target avr. when xtal1 jumper is not mounted, the internal clock system is disconnected. this allows external clock signals or crystals to be used as tar- get clock source for the avr. figure 3-28 illustrates the xtal1 jumper option. figure 3-28. xtal1 jumper options when the xtal1 jumper is not mounted, an external clock source or crystal can be con- nected to the porte header. this is shown in figure 3-30. r (4.7 kohm) c (10 nf) reset aref reset xtal1 oscsel jumper mounted on-board xtal1 signal connected (default) aref reset xtal1 oscsel jumper not mounted on-board xtal1 signal disconnected
hardware description avr STK500 user guide 3-21 1925c?avr?3/03 when the xtal1 jumper is mounted, the STK500 internal clock system is used as main clock to the target avr. the internal clock system can either use a crystal in the on-board crystal socket or a software-generated clock from the master microcontroller. the frequency of the software-generated clock can be set from 0 to 3.68 mhz. the default value is 3.68 mhz. section 5.3.5.3 on page 5-7 explains how to set the clock fre- quency from avr studio. when using the STK500 software-generated cloc k system as main clock, the target avr microcontroller fuses should be configured for ?external clock? as clock source. this gives shortest start-up time for the microcontroller. for details of start-up time, see the datasheet for the avr microcontroller. for an explanation of clock source fuses con- figuration, see section 5.3.2 on page 5-3. not all avr devices have fuses for selection between using a crystal or oscillator as clock source. the internal clock system is selected with the oscsel jumper. figure 3-29 shows the jumper options for oscsel. the on-board oscillator will work with ceramic resonators or crystals between 2 - 20 mhz (at-cut, fundamental and parallel resonant crystals). figure 3-29. oscsel jumper options when programming avr in high-voltage programming mode, oscsel should be mounted on pins 1 and 2 to give the master microcontroller control of the target clock. this is explained in detail in section 3.7.2 on page 3-11. note: in a real application with only one avr connected to the crystal, there is no need for an external oscillator circuit. the STK500 has eight different avr sockets connected to the same clock system. the long signal lines in this system makes it difficult to drive a crystal with the on-chip oscillators on the avr. the oscillator on STK500 is designed to operate on all target voltages from 1.8 to 6.0v. xtal1 oscsel jumper mounted on pins 1 and 2 on-board software clock signal connected (default) jumper mounted on pins 2 and 3 on-board crystal signal connected jumper not mounted on-board xtal1 signal disconnected xtal1 oscsel xtal1 oscsel
hardware description 3-22 avr STK500 user guide 1925c?avr?3/03 figure 3-30. xtal1 and oscsel connections 3.8.5 bsel2 jumper the bsel2 jumper connects the byte select 2 signal for high-voltage programming of atmega8, atmega16, atmega161, atmega163, atmega128, and atmega323. the bsel2 jumper should only be mounted when high-voltage programming atmega16, atmega161, atmega163, atmega128, or atmega323. when using atmega8, con- nect the right bsel2 pin to pc2 in the target area. see figure 3-31. for descriptions of the byte select 2 signal, see the programming section of the corresponding parts datasheet. figure 3-31. bsel2 connection for atmega8 3.8.6 pjump jumpers the pjump jumpers route the programming pin of at90s2333, at90s4433, and atmega8 to the programming lines when using high-voltage programming. the pjump jumpers should only be mounted when using high-voltage programming on at90s2333, at90s4433, or atmega8. during debugging, high-voltage programming of other parts and isp programming, these jumpers should not be mounted. figure 3-32. pjump jumpers placement pe1 rst gnd xt2 vtg pe0 pe2 ref xt1 gnd 1 2 xtal1 net xtal1 voltage converter vtg 5v avr studio master mcu crystal porte jumper jumper oscillator oscsel 3 2 1 bsel2 pjump cable to pc2 correct jumper placement not correct
hardware description avr STK500 user guide 3-23 1925c?avr?3/03 3.9 expansion connectors STK500 has two expansion connectors, one on each side of the programming module. all avr i/o ports, programming signals and control signals are routed to the expansion connectors. the expansion connectors allow easy prototyping of applications with STK500. the pinout of the expansion connectors is shown in figure 3-34 and fig- ure 3-35. figure 3-33. expansion headers expansion header 0 expansion header 1 prog ctrl prog data pin 1 pin 1
hardware description 3-24 avr STK500 user guide 1925c?avr?3/03 figure 3-34. expansion connector 0 pinout figure 3-35. expansion connector 1 pinout 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 gnd auxi0 ct7 ct5 ct3 ct1 nc rst pe1 gnd vtg pc7 pc5 pc3 pc1 pa7 pa5 pa3 pa1 gnd gnd auxo0 ct6 ct4 ct2 bsel2 ref pe2 pe0 gnd vtg pc6 pc4 pc2 pc0 pa6 pa4 pa2 pa0 gnd 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 gnd auxi1 data7 data5 data3 data1 si sck xt1 vtg gnd pb7 pb5 pb3 pb1 pd7 pd5 pd3 pd1 gnd gnd auxo1 data6 data4 data2 data0 so cs xt2 vtg gnd pb6 pb4 pb2 pb0 pd6 pd4 pd2 pd0 gnd
hardware description avr STK500 user guide 3-25 1925c?avr?3/03 3.9.1 signal descriptions the signals auxi1, auxi0, auxo1, and auxo0 are intended for future use. do not connect these signals to your application. the data[7:0] and ct[7:1] signals are also found on the prog data and prog ctrl con- nectors. these signals and connectors are explained in section 3.10 on page 3-25. the bsel2 signal is the same as that fo und on the bsel2 jumper. this jumper is explained in section 3.8.5 on page 3-22. the si, so, sck, and cs signals are connected to the dataflash. use of the dataflash is described in section 3.6 on page 3-6. nc means that this pin is not connected. the remaining signals are equal to those found on the port connectors, explained in section 3.4 on page 3-3. note: data, ct, and aux signals are based on 5v cmos logic. no voltage conver- sion to adapt to vtg is done on these signals. 3.10 prog ctrl and prog data headers the prog ctrl and prog data headers are used for high-voltage programming of the tar- get avr device. the placement of the headers is shown in figure 3-33. during parallel high-voltage programming, the prog ctrl signals are routed to portd of the target device. the prog data signals are routed to portb. see section 3.7.2 on page 3-11 for a complete description of high-voltage programming. the pinouts of the prog ctrl and prog data headers are shown in figure 3-36 and figure 3-37. for more information about high-voltage programming of avr devices, see the programming section of each avr datasheet. note: prog ctrl and data connectors are connected directly to the master microcon- troller without level converters. this means that these signals are always 5v logic. figure 3-36. prog ctrl header pinout the prog ctrl signals are normally used for the control signals when parallel high- voltage programming an avr device. note: all prog ctrl signals are based on 5v cmos logic. no voltage conversion to adapt to vtg is done on these signals. ct1(rdy/bsy) ct3(/wr) ct5(xa0) ct7(pagel) nc 1 2 nc (oe)ct2 (bs1)ct4 (xa1)ct6 gnd
hardware description 3-26 avr STK500 user guide 1925c?avr?3/03 figure 3-37. prog data header pinout the prog data signals are used for the data bus when parallel high-voltage program- ming an avr device. during isp programming, data5 is used as mosi, data6 is used as miso, and data7 is used for sck. note: all prog data signals are based on 5v cmos logic. no voltage conversion to adapt to vtg is done on these signals. 3.11 miscellaneous STK500 has 2 push buttons and 3 leds for special functions and status indication. the following section explains these features. figure 3-38 shows the placement of these functions. figure 3-38. special functions and status indication leds 3.11.1 reset push button the reset push button resets the target avr device when pushed. the master micro- controller is not controlled by the reset push button. when the reset jumper is not mounted, the reset push button is disabled. data1 data3 data5 data7 nc data0 data2 data4 data6 gnd 1 2 target power led reset push button main power led status led program push button
hardware description avr STK500 user guide 3-27 1925c?avr?3/03 3.11.2 program push button future versions of avr studio may upgrade the master microcontroller on STK500. avr studio will then detect old software versions of STK500 and update the flash pro- gram memory of the master microcontroller. to do this, the user is required to push the program button when powering on STK500. avr studio issues instructions on how to perform the upgrade during the upgrade process. 3.11.3 main power led the red power led is directly connected to the STK500 main power supply. the power led is always lit when power is applied to STK500. 3.11.4 target power led the target power led is connected to vcc lines (vtg) on the target avr devices in the sockets. the target power led is lit when power is applied to the target avr device. 3.11.5 status led the program led is a 3-color led. during programming, the led is yellow. when the target avr device is successfully programmed, the led will turn green. if program- ming fails, the led will turn red to indicate that programming failed. when programming fails, check the troubleshooting guide in section 7 on page 7-1. during start-up, the sta- tus led will shift from red, through yellow, to green to indicate that the master microcontroller is ready.
hardware description 3-28 avr STK500 user guide 1925c?avr?3/03
avr STK500 user guide 4-1 rev. 1925c?avr?3/03 section 4 installing avr studio avr studio, with its integrated development environment (ide), is the ideal software for all avr development. it has an editor, an assembler and a debugger and is front-end for all avr emulators and the STK500 starter kit. to install avr studio, insert the supplied atmel cd-rom databook in the computer and navigate to ?products avr 8-bit risc software?. right-click with the mouse on the ?avrstudio.exe? file and select ?save link as?. select an empty directory and save the file. execute the ?avrstudio.exe? file; this is a self-extracting file that will extract all required files to the current directory. execute the ?setup.exe? file; this will guide you through the setup process. note: avr studio, version 3.2 or higher, is required for STK500 support.
installing avr studio 4-2 avr STK500 user guide 1925c?avr?3/03
avr STK500 user guide 5-1 rev. 1925c?avr?3/03 section 5 using avr studio 5.1 windows software in this section, the supporting software for STK500 will be presented and an in-depth description of the available programming options is given. 5.2 starting the windows software the software used for communicating with the STK500 development board is included in avr studio, version 3.2 and higher. for information on how to install this software, please see section 4 on page 4-1. once installed, avr studio can be started by double- clicking on the avr studio icon. if default install options are used, the program is located in the windows ?start menu programs atmel avr tools? folder. 5.2.1 starting STK500 pressing the ?avr? button on the avr studio toolbar will start the STK500 user inter- face as shown in figure 5-1. figure 5-1. avr studio with STK500 user interface
using avr studio 5-2 avr STK500 user guide 1925c?avr?3/03 5.3 STK500 user interface the STK500 user interface includes powerful features for the STK500 development board. the available settings are divided into six groups, each selectable by clicking on the appropriate tab. since different devic es have different features, the available options and selections will depend on which device is selected. unavailable features are grayed out. 5.3.1 ?program? settings the program settings are divided into four different subgroups. 5.3.1.1 device a device is selected by selecting the correct device from the pull-down menu. this group also includes a button that performs a chip erase on the selected device, erasing both the flash and eeprom memories. 5.3.1.2 programming mode this group selects programming mode. for devices only supporting high-voltage pro- gramming, the isp option will be grayed out. if both modes are available, select a mode by clicking on the correct method. checking ?erase device before programming? will force STK500 to perform a chip erase before programming code to the program memory (flash). checking ?verify device after pr ogramming? will force STK500 to perform a verification of the memory after programming it (both flash and eeprom). 5.3.1.3 flash if the STK500 user interface is opened without a project loaded in avr studio, the ?use current simulator/emulator flash memory? option will be grayed out. when a project is open, this option allows programming of the flash memory content currently present in the flash memory view of avr studio. for more information about avr studio mem- ory views, please take a look in the avr studio help file. if no project is running, or the source code is stored in a separate hex file, select the ?input hex file? option. browse to the correct file by pressing the button or type the complete path and filename in the text field. the selected file must be in ?intel-hex? for- mat or ?extended intel-hex? format. figure 5-2. program
using avr studio avr STK500 user guide 5-3 1925c?avr?3/03 5.3.1.4 eeprom if the STK500 user interface is opened without a project loaded in avr studio, the ?use current simulator/emulator eeprom memory? option will be grayed out. when a project is open, this option allows programming of the eeprom memory content cur- rently present in the eeprom memory view. for more information about avr studio memory views, please take a look in the avr studio help file. if no project is running, or the source code is stored in a separate hex file, select the ?input hex file? option. browse to the correct file by pressing the button or type the complete path and filename in the text field. the selected file must be in ?intel-hex? for- mat or ?extended intel-hex? format. 5.3.2 ?fuses? settings in the ?fuses? tab an overview of accessible fuses are presented. some fuses are only available during high-voltage programming. these will be displayed but not accessible if operating in isp programming mode. press the ?read? button to read the current value of the fuses, and the ?write? button to write the current fuse setting to the device. checking one of these check boxes indicates that this fuse should be enabled/pro- grammed, which means writing a ?0? to the fuse location in the actual device. note that the selected fuse setting is not affected by erasing the device with a chip-erase cycle (i.e., pressing ?chip erase? button in the ?program? settings). detailed information on what fuses are available in the different programming modes and their functions can be found in the appropriate device datasheet. figure 5-3. fuses
using avr studio 5-4 avr STK500 user guide 1925c?avr?3/03 5.3.3 ?lockbits? settings similar to the ?fuses? tab, the ?lockbits? tab shows which lock modes are applicable to the selected device. all lock bits are accessible in both isp and high-voltage program- ming. a lock mode may consist of a combination of setting multiple lock bits. this is handled by the STK500 user interface, and the correct lock bits are programmed auto- matically for the selected lock mode. once a lock mode protection level is enabled, it is not possible to lower the protection level by selecting a ?lower? degree of protection or by setting a different lock mode. the only way to remove a programmed lock bit is to perform a complete chip erase, erasing both program and data memories. one excep- tion exists: if the target device has a programmed ?eesave? fuse, the contents of the eeprom will be saved even though a complete chip erase on the device is performed. figure 5-4. lockbits 5.3.4 ?advanced? settings the ?advanced? tab is currently divided into two subgroups. 5.3.4.1 signature bytes by pressing the ?read signature? button, the signature bytes are read from the target device. the signature bytes act like an identifier for the part. after reading the signature, the software will check if it is the correct signature according to the chosen device. please refer to the avr datasheets to read more about signature bytes.
using avr studio avr STK500 user guide 5-5 1925c?avr?3/03 figure 5-5. advanced 5.3.4.2 oscillator calibration byte the oscillator calibration byte is written to the device during manufacturing, and cannot be erased or altered by the user. the calibr ation byte is a tuning value that should be written to the osccal register in order to tune the internal rc oscillator. 5.3.4.3 reading oscillator calibration byte by pressing the ?read cal. byte? button, the calibration value is read from the device and is shown in the ?value? text box. note that the calibration byte is not directly acces- sible during program execution and must be written to a memory location during programming if it shall be used by the program. if this option is grayed out, the selected device does not have a tunable internal rc oscillator. 5.3.4.4 writing oscillator calibration byte since the calibration byte is not directly accessible during program execution, the user should write the calibration byte into a known location in flash or eeprom memory. do this by writing the desired memory address in the ?write address? text box and then press the ?write to memory? button. the calibration byte is then written to the memory indicated by the ?flash? and ?eeprom? radio buttons. 5.3.5 ?board? settings the ?board? tab allows the changing of operating conditions on the STK500 develop- ment board. the following properties can be modified: vtarget, aref and oscillator frequency. the interface is very flexible and it is possible to force the operating conditions beyond the recommended specifications for the device. doing this is not recommended, and may damage the target device. the recommended operating conditions for the part are stated in the device datasheet.
using avr studio 5-6 avr STK500 user guide 1925c?avr?3/03 figure 5-6. board 5.3.5.1 vtarget vtarget controls the operating voltage for the target board. through the use of the slide bar or the text box, this voltage can be regulated between 0 and 6.0v in 0.1v incre- ments. please refer to the device datasheet to find the specified voltage range for the selected device. both voltages are read by pressing the ?read voltages? button, and written by pressing the ?write voltages? button. the physical connection of the vtarget voltage is shown in figure 3-22 on page 3-16. 5.3.5.2 aref aref controls the analog reference voltage for the adc converter. this setting only apply to devices with ad converter. through the use of the slide bar or the text box, this voltage can be regulated between 0 and 6.0v in 0.1v increments. please refer to the device datasheet to find the valid voltage range for the selected device. both vtarget and aref are read by pressing the ?read voltages? button, and written by pressing the ?write voltages? button. it is not possible to set aref to a higher voltage than vtarget because this will per- manently damage the avr. the physical connection of the aref voltage is shown in figure 3-24 on page 3-18.
using avr studio avr STK500 user guide 5-7 1925c?avr?3/03 5.3.5.3 oscillator the STK500 development board uses a program mable oscillator circuit that offers a wide range of frequencies for the target device. since it is not possible to generate an unlimited number of frequencies, the STK500 user interface will calculate the value closest to the value written to the oscillator text box. the calculated value is then presented in the oscillator text box, overwriting the previously written number. 5.3.6 ?auto? settings when programming multiple devices with the same code, the ?auto? tab offers a power- ful method of automatically going through a user-defined sequence of commands. the commands are listed in the order they are executed (if selected). to enable a command, the appropriate check box should be checked. for example, if only ?program flash? is checked when the ?start? button is pressed, the flash memory will be programmed with the hex file specified in the ?progr am? settings. all commands depend on and use the settings given in the STK500 user interface. figure 5-7. auto it is possible to log the command execution to a text file by checking the ?log to file? check box.
using avr studio 5-8 avr STK500 user guide 1925c?avr?3/03 5.3.6.1 setting up the system for auto-programming click on the check boxes for the commands that you want the STK500 user interface to perform. a typical sequence where the device is erased and then programmed is shown in figure 5-7. the chip is erased, both memories programmed and verified, and finally, fuses and lock bits are programmed. once configured, the same programming sequen ce is executed every time the ?start? button is pressed. this reduces both work and possibilities for errors due to operational errors. 5.3.6.2 logging the auto-programming to a file by clicking on the ?log to file? check box, all output from the commands are written to a text file. select or create the file by pressing the ?browse? button and navigate to the location where the file is placed or should be created. the output is directed to this file, and can be viewed and edited using a text editor. 5.3.7 history window the history window is located at the bottom of the STK500 view. in this window the dia- log between avr studio and STK500 is shown. for every new command performed, the old dialog is replaced with the new one. figure 5-8. history window
using avr studio avr STK500 user guide 5-9 1925c?avr?3/03 5.4 command line software the dos command line version of the STK500 software is useful for programming STK500 from external editors or for use in production programmers. simple batch files can be made for automatic programming. type ?STK500 -?? for help. the program returns errorcode 0 if the operation was successful, and error- code 1 if the operation failed. command line switches: [-d device name] [-m s|p] [-if infile] [-ie infile] [-of outfile] [-oe outfile] [-s] [-o] [-sf addr] [-seaddr] [-e] [-p f|e|b] [-r f|e|b] [-v f|e|b] [-l value] [-l value] [-y] [-f value] [-e value] [-f value] [-g value] [-q] [-x value] [-af start,stop] [-ae start,stop] [-c port] [-ut value] [-ua value] [-wt] [-wa] [-b h|s] [-! freq] [-t] [-g] [-z] [-h|?] 5.5 parameters d device name. must be applied when programming the device. see list below. m select programming mode; serial (s) or parallel/high-voltage (p). serial programming mode is the default, and is used if this parameter not applied. if name of flash input file. required for programming or verification of the flash memory. the file format is intel extended hex. ie name of eeprom input file. required for programming or verification of the eeprom memory. the file format is intel extended hex. of name of flash output file. required for readout of the flash memory. the file format is intel extended hex. oe name of eeprom output file. required for readout of the eeprom memory. the file format is intel extended hex. s read signature bytes. o read oscillator calibration byte. sf write oscillator call. byte to flash memory. ?addr? is byte address se write oscillator call. byte to eeprom memory. ?addr? is byte address e erase device. if applied with another programming parameter, the device will be erased before any other programming takes place. p program device; flash (f), eeprom (e) or both (b). corresponding input files are required. r read out device; flash (f), eeprom (e) or both (b). corresponding output files are required v verify device; flash (f), eeprom (e) or both (b). can be used with -p or stand alone. corresponding input files are required. l set lock byte. ?value' is an 8-bit hex. value. l verify lock byte. ?value? is an 8-bit hex. value to verify against. y read back lock byte.
using avr studio 5-10 avr STK500 user guide 1925c?avr?3/03 f set fuse bytes. ?value? is a 16-bit hex. value describing the settings for the upper and lower fuse. e set extended fuse byte. ?value? is an 8-bit hex. value describing the extend fuse settings. f verify fuse bytes. ?value? is a 16-bit hex. value to verify against. g verify extended fuse byte. ?value? is an 8-bit hex. value describing the extend fuse settings. q read back fuse bytes. x fill unspecified locations with a value (0x00-0xff). the default is to not program locations not specified in the input files. af flash address range. specifies the address range of operations. the default is the entire flash. byte addresses. ae eeprom address range. specifies the address range of operations. the default is the entire eeprom. byte addresses. c select communication port; ?com1? to ?com8?. if this parameter is omitted the program will scan the comm. ports for the STK500 ut set target voltage vtarget in volts. ?value? is a floating point value between 0.0 and 6.0, describing the new voltage. ua set adjustable voltage aref in volts. ?value? is a floating point value between 0.0 and 6.0, describing the new voltage. wt get current target voltage vtarget. wa get current adjustable voltage aref. b get revisions; hardware revision (h) and software revision (s). ! set oscillator frequency; ?freq? is the frequency in hz. t get oscillator frequency. g silent operation. z no progress indicator. for example, if piping to a file for log purposes, use this option to avoid the non-ascii characters used for the indicator. h|? help information (overrides all other settings) figure 5-9. sample usage STK500 -dat90s8515 -ms -e -pf -vf -iftest.hex erase before program program flash name of hex file select device number serial programming mode verify device
avr STK500 user guide 6-1 rev. 1925c?avr?3/03 section 6 in-system programming of an external target system the STK500 can be used as a programmer to program avr devices in other applica- tions. there are two different isp connector pinouts available: a 6-pin and a 10-pin version. both are supported by STK500. figure 6-1. 6-pin isp connector pinout figure 6-2. 10-pin isp connector pinout select the device to be programmed in the same way as programming a device on the STK500. the v cc of the target application is detected by STK500 and signals are con- verted into voltage levels suitable for the target system. note: if the other application has its own power supply to vtg, the jumper vtarget must be removed before connecting STK500 to the other application. STK500 may be damaged if the vtarget jumper is not removed. vtg mosi gnd miso sck rst 1 2 isp6pin vtg gnd gnd gnd gnd mosi nc rst sck miso 1 2 isp10pin
in-system programming of an external target system 6-2 avr STK500 user guide 1925c?avr?3/03
avr STK500 user guide 7-1 rev. 1925c?avr?3/03 section 7 troubleshooting guide table 7-1. troubleshooting guide problem reason solution the red power led is not on. the dc power cable is not connected. connect the dc power cable to the dc jack (page 2-3). wrong power supply is used. check that the power supply is of dc type 10 - 15v, min. 500 ma (page 2-3). the power switch is off. turn on the power switch. the preprogrammed example code does not toggle the leds. there is no avr device in the socket. plug the avr device into the right socket (page 2-3). the leds are not connected to the i/o ports. connect the leds header to the portd header, and the switches header to the portb header (page 3-3). the flash memory is erased. connect STK500 to a pc and reprogram the avr device (page 2-3). the avr device cannot be programmed. the pc serial cable is not connected. connect the serial cable to the pc com port and the rs232 prog port. the avr device is inserted in wrong socket. check that the correct socket is used (page 3-10). the avr device is inserted with wrong orientation. check that the notch on the avr socket matches the notch on the avr device. the target isp header is not connected. connect the 6-pin flexible cable from isp6pin header to the correct sprog target isp header (page 3-10). the jumpers settings are wrong. set jumper to default setup (page 3-15). the memory lock bits are programmed. erase the memory before programming.
troubleshooting guide 7-2 avr STK500 user guide 1925c?avr?3/03 the avr device cannot be programmed (continued). reset disable fuse is set. check reset disable fuse. programming too fast check oscillator settings and make sure it is not set higher than actual clock. external pull-up resistor on reset line too low. ensure that external pull-up resistor is 4.7 k ? . avr studio does not detect STK500. serial cable is not connected, or power is off. connect serial cable to rs232 prog and check power connections. pc com port is in use. disable other programs that are using pc com port. change pc com port. avr studio does not detect com port. disable com port auto- detection in avr studio file menu. force com port to correct com port. STK500 cannot be switched off. positive center power connector is used. use negative center power connector. turn off STK500 by removing power connector. the status led is blinking slowly there is a short circuit on aref resolve the short circuit. the status led is blinking quickly. there is a short circuit on vtarget. resolve the short circuit. an external vtarget is being used and has been turned off. set vtarget to a value below 0.3v in avr studio. the leds don?t work (running from external vtarget). STK500 must be powered for leds to work. supply poser to STK500 and turn it on. table 7-1. troubleshooting guide (continued) problem reason solution
avr STK500 user guide 8-1 rev. 1925c?avr?3/03 section 8 technical support for technical support, please contact avr@atmel.com . when requesting technical sup- port for STK500, please include the following information:  version number of avr studio. this can be found in the avr studio menu, ?help about?.  pc processor type and speed  pc operating system and version  what target avr device is used (complete part number)  programming voltage  jumper settings  a detailed description of the problem
technical support 8-2 avr STK500 user guide 1925c?avr?3/03
avr STK500 user guide 9-1 rev. 1925c?avr?3/03 section 9 example applications 9.1 using leds and switches connect portb to leds and portd to switches. leds will operate differently depending on what switch is pressed. tip: copy the code from this document into avr studio. ;***** STK500 leds and switch demonstration .include ?8515def.inc? .def temp =r16 ; temporary register .def delay =r17 ; delay variable 1 .def delay2 =r18 ; delay variable 2 ;***** initialization reset: ser temp out ddrb,temp ; set portb to output ;**** test input/output loop: out portb,temp ; update leds sbis pind,0x00 ; if (port d, pin0 == 0) inc temp ; then count leds one down sbis pind,0x01 ; if (port d, pin1 == 0)
example applications 9-2 avr STK500 user guide 1925c?avr?3/03 dec temp ; then count leds one up sbis pind,0x02 ; if (port d, pin2 == 0) ror temp ; then rotate leds one right sbis pind,0x03 ; if (port d, pin3 == 0) rol temp ; then rotate leds one left sbis pind,0x04 ; if (port d, pin4 == 0) com temp ; then invert all leds sbis pind,0x05 ; if (port d, pin5 == 0) neg temp ; then invert all leds and add 1 sbis pind,0x06 ; if (port d, pin6 == 0) swap temp ; then swap nibbles of leds ;**** now wait a while to make led changes visible. dly: dec delay brne dly dec delay2 brne dly rjmp loop ; repeat loop forever
avr STK500 user guide 10-1 rev. 1925c?avr?3/03 section 10 appendix a figure 10-1. STK500 block diagram control mcu target socket section expand connectors power supply target power system target reset system target clock system serial programming/ isp interface dataflash target push buttons target leds spare uart power button control uart self- prog. system reset button program button status led aux interface hw revision aref vtarget reset xtal1 control section target section port a port b port c port d port e/aux switches leds rs232 spare dataflash rs232 spare rs232 ctrl power connector power to control section connections to control section sprog1 sprog2 sprog3 isp10pin prog data prog ctrl isp6pin
appendix a 10-2 avr STK500 user guide 1925c?avr?3/03
printed on recycled paper. 1925c?avr?3/03 /2m disclaimer: atmel corporation makes no warranty for the use of its products, other than those expressly contained in the company?s standar d warranty which is detailed in atmel?s terms and conditions located on the company?s web site. the company assumes no responsibi lity for any errors which may appear in this document, reserves the right to change devices or specifications detailed herein at any time wi thout notice, and does not make any commitment to update the information contained herein. no licenses to patents or other intellectual property of atmel are granted by the company in connection with the sale of atmel products , expressly or by implication. atmel?s products are not aut horized for use as critical components in life support devices or systems. atmel corporation atmel operations 2325 orchard parkway san jose, ca 95131 tel: 1(408) 441-0311 fax: 1(408) 487-2600 regional headquarters europe atmel sarl route des arsenaux 41 case postale 80 ch-1705 fribourg switzerland tel: (41) 26-426-5555 fax: (41) 26-426-5500 asia room 1219 chinachem golden plaza 77 mody road tsimshatsui east kowloon hong kong tel: (852) 2721-9778 fax: (852) 2722-1369 japan 9f, tonetsu shinkawa bldg. 1-24-8 shinkawa chuo-ku, tokyo 104-0033 japan tel: (81) 3-3523-3551 fax: (81) 3-3523-7581 memory 2325 orchard parkway san jose, ca 95131 tel: 1(408) 441-0311 fax: 1(408) 436-4314 microcontrollers 2325 orchard parkway san jose, ca 95131 tel: 1(408) 441-0311 fax: 1(408) 436-4314 la chantrerie bp 70602 44306 nantes cedex 3, france tel: (33) 2-40-18-18-18 fax: (33) 2-40-18-19-60 asic/assp/smart cards zone industrielle 13106 rousset cedex, france tel: (33) 4-42-53-60-00 fax: (33) 4-42-53-60-01 1150 east cheyenne mtn. blvd. colorado springs, co 80906 tel: 1(719) 576-3300 fax: 1(719) 540-1759 scottish enterprise technology park maxwell building east kilbride g75 0qr, scotland tel: (44) 1355-803-000 fax: (44) 1355-242-743 rf/automotive theresienstrasse 2 postfach 3535 74025 heilbronn, germany tel: (49) 71-31-67-0 fax: (49) 71-31-67-2340 1150 east cheyenne mtn. blvd. colorado springs, co 80906 tel: 1(719) 576-3300 fax: 1(719) 540-1759 biometrics/imaging/hi-rel mpu/ high speed converters/rf datacom avenue de rochepleine bp 123 38521 saint-egreve cedex, france tel: (33) 4-76-58-30-00 fax: (33) 4-76-58-34-80 e-mail literature@atmel.com web site http://www.atmel.com ? atmel corporation 2003 . all rights reserved. atmel ? and combinations thereof, avr ? , avr studio ? , and dataflash ? are the registered trademarks of atmel corporation or its subsidiaries. pentium ? is a regis- tered trademarks of intel corporation. windows ? 95/98/2000/me and windows nt ? are registered trade- marks of microsoft corporation. other terms and product names may be the trademarks of others.


▲Up To Search▲   

 
Price & Availability of STK500

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X